Skip to content

btc: fix MSVC C2668 HexStr ambiguity breaking btc Windows release lane - #718

Closed
frstrtr wants to merge 1 commit into
masterfrom
ci-steward/btc-msvc-hexstr
Closed

btc: fix MSVC C2668 HexStr ambiguity breaking btc Windows release lane#718
frstrtr wants to merge 1 commit into
masterfrom
ci-steward/btc-msvc-hexstr

Conversation

@frstrtr

@frstrtr frstrtr commented Jul 16, 2026

Copy link
Copy Markdown
Owner

Problem. v0.2.1 release run 29467003679 — btc package (Windows x86_64) failed with node.hpp(131,40): error C2668: HexStr ambiguous call. All 24 other lanes and the SHA256SUMS/draft step passed.

Cause. submit_block_hex passed a std::vector<unsigned char> directly to HexStr. There are three overloads (Span<const uint8_t|char|std::byte>); MSVC finds the vector->Span conversion ambiguous where GCC/Clang resolve to uint8_t.

Fix. Wrap in an explicit Span<const unsigned char>(data, size) — the idiom already used by every other coin lane (dgb/dash/ltc/bch). One line, btc-only, no behavior change.

Validate: btc Windows lane should now compile. Signed commit; no self-merge — integrator gate.

submit_block_hex passed a std::vector<unsigned char> straight to HexStr.
MSVC deems the vector->Span conversion ambiguous across the three
overloads (Span<const uint8_t|char|std::byte>) where GCC/Clang pick
uint8_t, breaking the btc Windows release lane (release run 29467003679,
node.hpp:131 C2668). Wrap in an explicit Span<const unsigned char>, the
idiom already used by every other coin lane.
@frstrtr

frstrtr commented Jul 16, 2026

Copy link
Copy Markdown
Owner Author

Duplicate of #717 (same single-site C2668 HexStr disambiguation at src/impl/btc/coin/node.hpp:131). #717 is fully green incl. ASan with a documented full-sweep of remaining HexStr sites; keeping it as the survivor. Closing this to avoid a merge collision. Branch ci-steward/btc-msvc-hexstr preserved (not deleted).

@frstrtr frstrtr closed this Jul 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant